﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Entity
{
    public class User
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public string Level { get; set; }
        public string Admin { get; set; }
        public string Ord { get; set; }
        public string Active { get; set; }

        public User UserIDataReader(IDataReader dr)
        {
            return new User
            {
                 Id = Convert.ToString(dr["Id"]),
                 Name = Convert.ToString(dr["Name"]),
                 Username = Convert.ToString(dr["Username"]),
                 Password = Convert.ToString(dr["Password"]),
                 Level = Convert.ToString(dr["Level"]),
                 Active = Convert.ToString(dr["Active"]),
                 Ord = Convert.ToString(dr["Ord"]),
                 Admin = Convert.ToString(dr["Admin"]),
            };
        }
    }
}
